#include("common.html")
<!DOCTYPE html>
<html>

	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta charset="utf-8" />
		<title>河北省医疗保障局</title>
		<link rel="stylesheet" href="#(tpath)/static/css/css.css" type="text/css" />
		<link rel="stylesheet" href="#(tpath)/static/css/slide.css" type="text/css" />
		<link rel="stylesheet" href="#(tpath)/static/css/nav.css" type="text/css" />
		<link rel="stylesheet" href="#(tpath)/static/css/owl.carousel.css" type="text/css" />
		<link rel="stylesheet" href="#(tpath)/static/css/respon.css" type="text/css" />
		<link rel="stylesheet" href="#(tpath)/static/css/font/iconfont.css" type="text/css" />
		<script type="text/javascript" src="#(tpath)/static/js/jquery.pack.js"></script>
		<script type="text/javascript" src="#(tpath)/static/js/jquery-1.8.3.min.js"></script>
		<script type="text/javascript" src="#(tpath)/static/js/jquery.SuperSlide.2.1.1.js"></script>
<!-- 		<script type="text/javascript" src="#(tpath)/static/js/tab.js"></script> -->
		<script type="text/javascript" src="#(tpath)/static/js/owl.carousel.js"></script>
		<script type="text/javascript">
			$(function() {
				$(".nav>li").hover(function() {
					$(this).children('ul').stop(true, true).show(300);
				}, function() {
					$(this).children('ul').stop(true, true).hide(300);
				})
			})
		</script>
	</head>
	<body>
	
		<!--头部-->
		#include("header.html")
		<section>
			<div class="idxnewcon ">
				<div class="nyposition"><i class="icon iconfont">&#xe648;</i>您当前所在位置： 首页 > 互动交流 > 局长信箱</div>
								<div class="w100">
					<div class="f_left leftmenu">
						<dl id="navselect">
							<dt>互动交流</dt>
							<a href="../static/messageEmail"><dd class="columnhover">局长信箱</dd></a>
							<a href="../static/message"><dd>网上留言</dd></a>
						</dl>
						<div class="zhuanti">
							<h3>专题专栏<em></em></h3>
							<div class="picMarquee-top">
								<div class="bd">
									<ul class="picList">
 									#ad_position(id="3")
								  #for(ad : adPosition.ads)
		
										<li>
											<div class="pic">
												<a href="#(ad.url==null?'javaScript:;':ad.url)" target="_blank"><img src="#(ad.image)" /></a>
											</div>
										</li>
								 #end
								 #end
									</ul>
								</div>
							</div>

						</div>
					</div>
					<div class="f_right rightcon">
						<h3>局长信箱</h3>
						<div class="srnb" style=" border:#eaeaea solid 0px; margin:25px auto; width: 100%;  text-align: center;">
				<div id="lydiv" style="width:100%;height:100%;position: relative;background-size: 60%;background-position: left top;background-repeat: no-repeat;background-image:url(./null.png)">
					<ul class="ci1 he40">
						<li class="shr1 rig"><font color="red">*</font> 姓名：</li>
						<li class="shr2"><input type="text" autocomplete="off" maxlength="50" id="name" name="name" value="" class="text-base text-3"></li>
						<!--<li class="shr3 rig sri mrt20"><font color="red">*</font> 身份证号：</li>
						<li class="shr4 mrt20"><input type="text" autocomplete="off" maxlength="18" id="idcardno" name="idcardno" value="" class="text-base text-3"></li>-->
					</ul>

					<ul class="ci1 he40">
						<li class="shr1 rig"><font color="red">*</font> 电话：</li>
						<li class="shr2"><input type="text" autocomplete="off" maxlength="50" id="tel" name="phone" value="" class="text-base text-3"></li>
						</ul><ul class="ci1 he40">
						<li class="shr3 rig sri mrt20"><font color="red"></font> 电子邮箱：</li>
						<li class="shr4 mrt20"><input type="text" autocomplete="off" id="email" name="email" value="" class="text-base text-3"></li>
					</ul>

					<ul class="ci1 he40">
						<li class="shr1 rig"><font color="red">*</font> 标题：</li>
						<li class="shr2">
							<input type="text" autocomplete="off" maxlength="50" id="title" name="title" value="" class="text-base text-3">
						</li>
						</ul>
						<ul class="ci1 he40">
						<li class="shr1 rig"><font color="red">*</font> 来信类别：</li>
						<li class="shr4 mrt20">
							<select id="catery" name="catery" class="text-base text-33">
								<option value="-1">请您选择</option>
							<option value="1">建议</option><option value="2">问题</option><option value="3">举报</option><option value="4">咨询</option><option value="5">其他</option></select>
						</li>
					</ul>

					<ul class="ci1 ">
						<li class="shr1 rig"><font color="red">*</font> 内容：</li>
						<li class="shr6 lft"><textarea autocomplete="off" type="text" id="content" name="content" class="text-base text-4" style="resize:none"></textarea>
						</li>
					</ul>

					<!--<ul class="ci1 he40">
						<li class="shr1 rig"><font color="red">*</font> 联系地址：</li>
						<li class="shr21">
							<input type="text" autocomplete="off" maxlength="50" id="unit" name="unit" value="" class="text-base text-3">
						</li>
					</ul>-->

					<ul id="trcode" class="ci1 he40">
						<li class="rig shr1"><font color="red">*</font> 验证码：</li>
						<li class="shr2 shr7"><input autocomplete="off" type="text" id="captcha" value="" name="captcha" class="text-base text-5 lef"></li>
						<li class="fontsize13">
<!-- 							<input type="text" value="" class="input-text" name="captcha" id="captcha" style='width:150px;'> --><img id="captchaImage" src="#(base)/common/captcha/image" title="点击更换验证码" style="height: 28px;"/>
						</li>
					</ul>
					<div style="height:90px">
						<input type="button" id="btnSubmit" onclick="submit();" value="提交" class="bnt-3 tijiao">
						<input type="reset" value="重置" onclick="reset();" class="bnt-3 chongzhi">
					</div>
				</div>
			</div>
					</div>
					<div class="clear"> </div>
				</div>
			</div>
		</section>
		<footer>
			<!--描述：底部信息-->
			<div class="foot">
				<div class="foot_text">
					<a>关于本网</a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a>网站声明</a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a>联系我们</a>&nbsp;&nbsp;|&nbsp;&nbsp;
					<a>网站地图</a>
				</div>
				<div class="copyright">
					版权所有：河北省医疗保障局&nbsp;&nbsp;冀ICP备******号<br /> 主办单位：河北省医疗保障局
				</div>
			</div>

		</footer>
		<script type="text/javascript">
	    var $captchaImage = $("#captchaImage");
	    
	    // 更换验证码
	    $captchaImage.click(function() {
	        $captchaImage.attr("src", "#(base)/common/captcha/image?timestamp=" + new Date().getTime());
	    });
			jQuery(".picMarquee-top").slide({
				mainCell: ".bd ul",
				autoPlay: true,
				effect: "topMarquee",
				vis: 3,
				interTime: 50
			});
			function reset(){
				$("input[name=name]").val("");
				$("input[name=phone]").val("");
				$("input[name=email]").val("");
				$("input[name=title]").val("");
				$("#catery").val("-1");
				$("input[name=captcha]").val("");
				$("#content").val("");
			}
			function submit(){
				  var name = $("input[name=name]").val();
				  var phone = $("input[name=phone]").val();
				  var email = $("input[name=email]").val();
				  var title = $("input[name=title]").val();
				  var type = $("#catery").val();
				  var captcha = $("input[name=captcha]").val();
				  var content = $("#content").val();
				  
				  if(name ==""){
					  alert("姓名不可为空");
					  return;
				  }
				  if(phone == ""){
					  alert("电话不可为空");
					  return;
				  }
				  if(!(/^1[34578]\d{9}$/.test(phone))){ 
				        alert("电话格式错误");  
				        return false; 
				    }
				  if(email == ""){
					  
				  }else{
					  var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
						if(!reg.test(email)){
							alert("邮箱格式错误");  
					        return false; 
						}

				  }
				  if(title == ""){
					  alert("标题不可为空");
					  return;
				  }
				  if(type == "" || type=="-1"){
					  alert("请选择来信类别");
					  return;
				  }
				  if(content == ""){
					  alert("请填写内容");
					  return;
				  }
				  if(captcha == ""){
					  alert("请输入验证码");
					  return;
				  }
				   
				  $.ajax({  
		                type: "post",
		                dataType: "json", 
		                url: "../api/saveForm",
		                data: {"modelId":"5","name":name,"phone":phone,"email":email,"title":title,"type":type,"captcha":captcha,"content":content},  
		                error: function (data) { },  
		                success: function (data){ 
		                    if(data.type=="error"){
		                        alert(data.msg);
		                    }else{
		                        alert("留言成功!");
		                        location.reload();
		                    }
		                }  
		            }); 
			}
		</script>
	</body>

</html>